package com.overkill.game;

import java.util.HashMap;

public class GameOptions {
	
	private HashMap<String, Integer> integerValues = new HashMap<String, Integer>();
	private HashMap<String, String> stringValues = new HashMap<String, String>();
	private HashMap<String, Float> floatValues = new HashMap<String, Float>();
	
	public GameOptions(){
		integerValues = new HashMap<String, Integer>();
		stringValues = new HashMap<String, String>();
		floatValues = new HashMap<String, Float>();
	}
	
	public void put(String key, int value){
		integerValues.put(key, value);
	}
	
	public void put(String key, String value){
		stringValues.put(key, value);
	}
	
	public void put(String key, float value){
		floatValues.put(key, value);
	}
	
	public int getInteger(String key, int defaultValue){
		if(integerValues.containsKey(key))
			return integerValues.get(key);
		else
			return defaultValue;
	}
	
	public String getString(String key, String defaultValue){
		if(stringValues.containsKey(key))
			return stringValues.get(key);
		else
			return defaultValue;
	}
	
	public float getFloat(String key, float defaultValue){
		if(floatValues.containsKey(key))
			return floatValues.get(key);
		else
			return defaultValue;
	}
	
	public void clear(){
		integerValues.clear();
		stringValues.clear();
		floatValues.clear();
	}	
}
